package entity;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Administrator on 2016/5/27.
 * 首页头部viewpager的数据
 */
public class ViewPagerHead implements Parcelable{

    /**
     * code : 1
     * imgurl : [{"url":"www.baidu.com","pic":"http://192.168.1.50:8080/wifi/icon/img1/0002.png","time":"5","order":"1"},{"url":"www.baidu.com","pic":"http://192.168.1.50:8080/wifi/icon/img1/0003.png","time":"5","order":"2"}]
     */

    private String code;
    private String text1;
    private String text2;
    private String text3;
    private String text4;
    private String text5;
    private String time;

    /**
     * url : www.baidu.com
     * pic : http://192.168.1.50:8080/wifi/icon/img1/0002.png
     * time : 5
     * order : 1
     */

    public ViewPagerHead(){

    }
    public void setText1(String text1) {
        this.text1 = text1;
    }

    public void setText2(String text2) {
        this.text2 = text2;
    }

    public void setText3(String text3) {
        this.text3 = text3;
    }

    public void setText4(String text4) {
        this.text4 = text4;
    }

    public void setText5(String text5) {
        this.text5 = text5;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getText1() {
        return text1;
    }

    public String getText2() {
        return text2;
    }

    public String getText3() {
        return text3;
    }

    public String getText4() {
        return text4;
    }

    public String getText5() {
        return text5;
    }

    public String getTime() {
        return time;
    }
    private List<ImgurlEntity> imgurl;

    public void setCode(String code) {
        this.code = code;
    }

    public void setImgurl(List<ImgurlEntity> imgurl) {
        this.imgurl = imgurl;
    }

    public String getCode() {
        return code;
    }

    public List<ImgurlEntity> getImgurl() {
        return imgurl;
    }


    @Override public int describeContents() {
        return 0;
    }

    @Override public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(code);
        dest.writeString(text1);
        dest.writeString(text2);
        dest.writeString(text3);
        dest.writeString(text4);
        dest.writeString(text5);
        dest.writeString(time);
    }
    public static final Parcelable.Creator<ViewPagerHead> CREATOR = new Creator<ViewPagerHead>()
    {
        @Override public ViewPagerHead[] newArray(int size)
        {
            return new ViewPagerHead[size];
        }

        @Override public ViewPagerHead createFromParcel(Parcel in)
        {
            return new ViewPagerHead(in);
        }
    };

    public ViewPagerHead(Parcel in)
    {
        code = in.readString();
        text1 = in.readString();
        text2 = in.readString();
        text3 = in.readString();
        text4 = in.readString();
        text5 = in.readString();
        time = in.readString();
    }


    public static class ImgurlEntity implements Parcelable{
        private String url;
        private String pic;
        private String time;
        private String order;

        public ImgurlEntity(){

        }
        public void setUrl(String url) {
            this.url = url;
        }

        public void setPic(String pic) {
            this.pic = pic;
        }

        public void setTime(String time) {
            this.time = time;
        }

        public void setOrder(String order) {
            this.order = order;
        }

        public String getUrl() {
            return url;
        }

        public String getPic() {
            return pic;
        }

        public String getTime() {
            return time;
        }

        public String getOrder() {
            return order;
        }

        @Override public int describeContents() {
            return 0;
        }

        @Override public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(url);
            dest.writeString(pic);
            dest.writeString(time);
            dest.writeString(order);
        }
        public static final Parcelable.Creator<ImgurlEntity> CREATOR = new Creator<ImgurlEntity>()
        {
            @Override public ImgurlEntity[] newArray(int size)
            {
                return new ImgurlEntity[size];
            }

            @Override public ImgurlEntity createFromParcel(Parcel in)
            {
                return new ImgurlEntity(in);
            }
        };

        public ImgurlEntity(Parcel in)
        {
            url = in.readString();
            pic = in.readString();
            time= in.readString();
            order = in.readString();

        }
    }


}
